package com.devunion.salon.persistence;

import javax.persistence.*;
import java.sql.Date;

/**
 * CREATE TABLE `cashio` (
 * `id` int(11) NOT NULL auto_increment,
 * `created_dt` datetime default NULL,
 * `cout` decimal(10,3) default NULL,
 * `cin` decimal(10,3) default NULL,
 * 'notes' varchar(255) default NULL,
 * PRIMARY KEY  (`id`)
 * ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
 *
 * @author Viktar Liaskovich
 */

@Entity
@Table(name = "cash_in_out")
public class CashInOut extends BasePersistentObject {

    @Column(name = "created", nullable = true)
    private Date created;

    @Column(name = "number", nullable = true)
    private String number;

    @ManyToOne(cascade = {CascadeType.ALL})
    private Payment payment;

    @ManyToOne()
    private Location location;

    @Column(name = "notes", nullable = true)
    private String notes;

    public Date getCreated() {
        return created;
    }

    public void setCreated(Date created) {
        this.created = created;
    }

    public String getNotes() {
        return notes;
    }

    public void setNotes(String notes) {
        this.notes = notes;
    }

    public Payment getPayment() {
        return payment;
    }

    public void setPayment(Payment payment) {
        this.payment = payment;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public Location getLocation() {
        return location;
    }

    public void setLocation(Location location) {
        this.location = location;
    }
}
